package top.lgd.pojo.entity.operation;

import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Getter;
import lombok.Setter;
import top.lgd.base.LgdEntity;

import javax.validation.constraints.Size;
import java.math.BigDecimal;
import java.time.LocalDate;

/**
 * 经营会员流水表
 *
 * @author YYJ
 * @version 1.0
 * @since 2024/5/6 14:42
 */
@Getter
@Setter
@TableName("operation_member_flow")
public class MemberFlow extends LgdEntity {

    /**
     * 会员ID
     * Index
     */
    private Long memberId;

    /**
     * 流水日期
     * Index
     */
    private LocalDate flowDate;

    /**
     * 流水类型（IN-充值|OUT-消费）
     */
    @Size(max = 4)
    private String flowType;

    /**
     * 变动前金额
     */
    private BigDecimal beforeAmount;

    /**
     * 变动金额
     */
    private BigDecimal flowAmount;

    /**
     * 变动后金额
     */
    private BigDecimal afterAmount;

}